﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WZ.Entity
{
    /* 0: 未知
1: 名字
2: 代码
3: 当前价格
4: 昨收
5: 今开
6: 成交量（手）
7: 外盘
8: 内盘
9: 买一
10: 买一量（手）
11-18: 买二 买五
19: 卖一
20: 卖一量
21-28: 卖二 卖五
29: 最近逐笔成交
30: 时间
31: 涨跌
32: 涨跌%
33: 最高
34: 最低
35: 价格/成交量（手）/成交额
36: 成交量（手）
37: 成交额（万）
38: 换手率
39: 市盈率
40: 
41: 最高
42: 最低
43: 振幅
44: 流通市值
45: 总市值
46: 市净率
47: 涨停价
48: 跌停价
\~(?<SimplyName>[^~]*)\~(?<Code>[^~]*)\~(?<Price>[^~]*)\~(?<Yclose>[^~]*)\~(?<Topen>[^~]*)\~(?<Vol>[^~]*)\~(?<OutSize>[^~]*)\~(?<InSize>[^~]*)\~(?<Buy1>[^~]*)\~(?<TotalBuy1>[^~]*)\~(?<Buy2>[^~]*)\~(?<TotalBuy2>[^~]*)\~(?<Buy3>[^~]*)\~(?<TotalBuy3>[^~]*)\~(?<Buy4>[^~]*)\~(?<TotalBuy4>[^~]*)\~(?<Buy5>[^~]*)\~(?<TotalBuy5>[^~]*)\~(?<Sale1>[^~]*)\~(?<TotalSale1>[^~]*)\~(?<Sale2>[^~]*)\~(?<TotalSale2>[^~]*)\~(?<Sale3>[^~]*)\~(?<TotalSale3>[^~]*)\~(?<Sale4>[^~]*)\~(?<TotalSale4>[^~]*)\~(?<Sale5>[^~]*)\~(?<TotalSale5>[^~]*)\~(?<DealDetail>[^~]*)\~(?<GetTime>[^~]*)\~(?<UpDown>[^~]*)\~(?<UpDownPoint>[^~]*)\~(?<MaxPrice>[^~]*)\~(?<MinPrice>[^~]*)\~(?<SaleDetail>[^~]*)\~(?<VolHand>[^~]*)\~(?<TotalSalePrice>[^~]*)\~(?<TUN>[^~]*)\~(?<PE>[^~]*)\~(?<Other>[^~]*)\~(?<Max>[^~]*)\~(?<Min>[^~]*)\~(?<Amplitude>[^~]*)\~(?<CSV>[^~]*)\~(?<TMC>[^~]*)\~(?<PB>[^~]*)\~(?<HighLimit>[^~]*)\~(?<DropLimit>[^~]*)
*/
    /// <summary>
    /// 实时数据
    /// 数据来源:http://qt.gtimg.cn/q=sz000001
    /// </summary>
    public class StockMarket
    {
       
        public int ID { get; set; }
        [JsonProperty(PropertyName = "简称")]
        public string SimplyName { get; set; }
        [JsonProperty(PropertyName = "股票代码")]
        public string Code { get; set; }
        //[JsonProperty(PropertyName = "抓取时间")]
        //public string Date { get; set; }
        [JsonProperty(PropertyName = "当前价格")]
        public string Price { get; set; }
        [JsonProperty(PropertyName = "昨日收盘价")]
        public string Yclose { get; set; }
        [JsonProperty(PropertyName = "今开")]
        public string Topen { get; set; }
        [JsonProperty(PropertyName = "成交量（手）")]
        public string Vol { get; set; }
        [JsonProperty(PropertyName = "外盘")]
        public string OutSize { get; set; }
        [JsonProperty(PropertyName = "内盘")]
        public string InSize { get; set; }
        [JsonProperty(PropertyName = "买1")]
        public string Buy1 { get; set; }
        [JsonProperty(PropertyName = "买1量")]
        public string TotalBuy1 { get; set; }
        [JsonProperty(PropertyName = "买2")]
        public string Buy2 { get; set; }
        [JsonProperty(PropertyName = "买2量")]
        public string TotalBuy2 { get; set; }
        [JsonProperty(PropertyName = "买3")]
        public string Buy3 { get; set; }
        [JsonProperty(PropertyName = "买3量")]
        public string TotalBuy3 { get; set; }
        [JsonProperty(PropertyName = "买4")]
        public string Buy4 { get; set; }
        [JsonProperty(PropertyName = "买4量")]
        public string TotalBuy4 { get; set; }
        [JsonProperty(PropertyName = "买5")]
        public string Buy5 { get; set; }
        [JsonProperty(PropertyName = "买5量")]
        public string TotalBuy5 { get; set; }
        [JsonProperty(PropertyName = "卖1")]
        public string Sale1 { get; set; }
        [JsonProperty(PropertyName = "卖1量")]
        public string TotalSale1 { get; set; }
        [JsonProperty(PropertyName = "卖2")]
        public string Sale2 { get; set; }
        [JsonProperty(PropertyName = "卖2量")]
        public string TotalSale2 { get; set; }
        [JsonProperty(PropertyName = "卖3")]
        public string Sale3 { get; set; }
        [JsonProperty(PropertyName = "卖3量")]
        public string TotalSale3 { get; set; }
        [JsonProperty(PropertyName = "卖4")]
        public string Sale4 { get; set; }
        [JsonProperty(PropertyName = "卖4量")]
        public string TotalSale4 { get; set; }
        [JsonProperty(PropertyName = "卖5")]
        public string Sale5 { get; set; }
        [JsonProperty(PropertyName = "卖5量")]
        public string TotalSale5 { get; set; }
        /// <summary>
        /// 格式： 时间/交易量（手）/买OR卖/成交金额/总单量
        /// </summary>
        [JsonProperty(PropertyName = "最近成交明细")]
        public string DealDetail { get; set; }
        [JsonProperty(PropertyName = "时间")]
        public string GetTime { get; set; }
        [JsonProperty(PropertyName = "涨跌")]
        public string UpDown { get; set; }
        [JsonProperty(PropertyName = "涨跌%")]
        public string UpDownPoint { get; set; }
        [JsonProperty(PropertyName = "最高")]
        public string MaxPrice { get; set; }
        [JsonProperty(PropertyName = "最低")]
        public string MinPrice { get; set; }
        [JsonProperty(PropertyName = "价格/成交量（手）/成交额")]
        public string SaleDetail { get; set; }
        [JsonProperty(PropertyName = "成交量（手）?")]
        public string VolHand { get; set; }
        [JsonProperty(PropertyName = "成交额（万））")]
        public string TotalSalePrice { get; set; }
        [JsonProperty(PropertyName = "换手率")]
        public string TUN { get; set; }
        [JsonProperty(PropertyName = "市盈率")]
        public string PE { get; set; }
        [JsonProperty(PropertyName = "其他？")]
        public string Other { get; set; }
        [JsonProperty(PropertyName = "其他？最高")]
        public string MaxPrice1 { get; set; }
        [JsonProperty(PropertyName = "其他？最低")]
        public string MinPrice1 { get; set; }
        [JsonProperty(PropertyName = "振幅")]
        public string Amplitude { get; set; }
        [JsonProperty(PropertyName = "流通市值")]
        public string CSV { get; set; }
        [JsonProperty(PropertyName = "总市值")]
        public string TMC { get; set; }
        [JsonProperty(PropertyName = "市净率")]
        public string PB { get; set; }
        [JsonProperty(PropertyName = "涨停价")]
        public string HighLimit { get; set; }
        [JsonProperty(PropertyName = "跌停价")]
        public string DropLimit { get; set; }
    }
}
